package com.cyys.modules.generator.dao;

import com.cyys.common.mapper.CyysBaseMapper;
import com.cyys.modules.generator.model.GeneratorTable;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GeneratorTableDao extends CyysBaseMapper<GeneratorTable> {

    @Select("select `TABLE_NAME`,`TABLE_COMMENT` from information_schema.TABLES where TABLE_SCHEMA=(select database())")
    List<GeneratorTable> listTable() ;

    void physicalDeleteById(String id) ;

    @Select("select `TABLE_NAME`,`TABLE_COMMENT` from information_schema.TABLES where TABLE_SCHEMA=(select database()) and `TABLE_NAME`=#{tableName} ")
    GeneratorTable getTableByName(String tableName) ;
}
